home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Networking / OTStreamLogViewer / FileLogging.h < prev    next >
Encoding:
Text File  |  2000-09-28  |  2.1 KB  |  61 lines  |  [TEXT/CWIE]

  1. /*
  2.     File:        FileLogging.h
  3.  
  4.     Contains:    File logging engine for OTStreamLogViewer.
  5.  
  6.     Written by: Quinn "The Eskimo!"    
  7.  
  8.     Copyright:    Copyright © 1998-1999 by Apple Computer, Inc., All Rights Reserved.
  9.  
  10.                 You may incorporate this Apple sample source code into your program(s) without
  11.                 restriction. This Apple sample source code has been provided "AS IS" and the
  12.                 responsibility for its operation is yours. You are not permitted to redistribute
  13.                 this Apple sample source code as "Apple sample source code" after having made
  14.                 changes. If you're going to re-distribute the source, we require that you make
  15.                 it clear in the source that the code was descended from Apple sample source
  16.                 code, but that you've made changes.
  17.  
  18.     Change History (most recent first):
  19.                 7/23/1999    Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
  20.                 
  21.  
  22. */
  23.  
  24. /////////////////////////////////////////////////////////////////////
  25. // Pick up LogEntryPtr definition.
  26.  
  27. #include "LogEngine.h"
  28.  
  29. /////////////////////////////////////////////////////////////////////
  30.  
  31. extern OSStatus StartFileLogging(void);
  32.     // Tells the file log module that we're about to
  33.     // start logging records to the file using RecordLogEntryToFile.
  34.     // Returns an error if the file logging module could not
  35.     // start up, in which case the client should not call
  36.     // StopFileLogging.
  37.  
  38. // The following two routines both use the same assembly
  39. // buffer. If you call LogEntryToCString, you must copy the
  40. // results out of the buffer before you call either of
  41. // these routines again.
  42.  
  43. extern char *LogEntryToCString(LogEntry* thisEntry);
  44.     // Converts a log entry to a string.  The log module
  45.     // has to do this anyway, so we export the function
  46.     // for use by the clipboard code.
  47.     
  48. extern void RecordLogEntryToFile(LogEntry* thisEntry);
  49.     // Record a log entry to the log file.
  50.  
  51. extern void FileLoggingIdle(void);
  52.     // This routine is called periodically by the client
  53.     // to flush out any pending log entries.
  54.     
  55. extern Boolean FileLoggingActive(void);
  56.     // Returns whether a log file is currently open or not.
  57.  
  58. extern void StopFileLogging(void);
  59.     // Called by the client to shut down the file logging
  60.     // module.
  61.